record List[T] {}

def map[T](var f : T->T, var l : List[T]) : List[T] {
    return l;
}

record File {

}

def open(var filename : String) : File {
    return File();
}

record HiScreen {
    width : Int;
    height : Int;
}

type Color = (Int, Int, Int);

trait Canvas {
    def fill(var self : Self, var c : Color) : Unit;
    def run(var self : Self, var f : HiScreen -> HiScreen) : Unit;
    def add_action(self : Self, message : String, action : Self -> (Int, Int) -> Unit) : Unit;
}

implement Canvas for HiScreen {
    def fill(var self : Self, var c : Color) : Unit {}
    def run(var self : Self, var f : Self -> Self) : Unit {}
    def add_action(self : Self, message : String, action : Self -> (Int, Int) -> Unit) : Unit {}
}

def drawLine(x1 : Int, y1 : Int, x2 : Int, y2 : Int, color : Color, s: HiScreen) : HiScreen {
    return s;
}

def drawCircle(x : Int, y : Int, r : Int, color : Color, s: HiScreen) : HiScreen {
    return s;
}

def delaySystem(delay : Int) {
    return unit;
}

def updateScreen(s : HiScreen) : HiScreen {
    return s;
}